<template>
  <view class="up">
    <button @click="choose">+ 上传材料</button>
    <view class="list">
      <text v-for="f in files" :key="f.name">{{ f.name }}</text>
    </view>
  </view>
</template>
<script setup>
import { ref } from 'vue'
const files = ref([])
const choose = () => {
  uni.chooseFile({
    count:9,
    success:r => files.value = r.tempFiles.map(f => ({ name:f.name, url:f.path }))
  })
}
</script>
<style scoped>
.up{ padding:20rpx 0; }
button{ background:#07c160; color:#fff; }
.list{ margin-top:20rpx; }
</style>